﻿using System;
using System.ComponentModel;
using System.Windows;
using System.Data; 
using ReflectionStudio.Core.Events; 
namespace WPFExcelReport
{
    /// <summary>
    /// Interaction logic for EditEventWindow.xaml
    /// </summary>
    public partial class TVKPLAN 
    {

        ITXEXRPT ITXEXRPT;
        public TVKPLAN()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VVKPOS();
            this.DataContext = MV; 
            InitializeComponent(); 
           
        }
      
        public override void Window_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
           
        }
      
        public override void vwMaster_CurrentChanged(object sender, EventArgs e)
        {
           // base.vwMaster_CurrentChanged(sender, e);
           
        }

        public override void QueryCommand(object sender, System.Windows.RoutedEventArgs e)
        {
            dwData = TBMain.NewRow();
            dwData["VKPART"] = " AND VKPART LIKE '" + ART.Trim() + "%'";
            dwData["VKPFARBE"] = " AND VKPFARBE LIKE '" + FARBE.Trim() + "%'";
            dwData["VKPKDKOMM"] = " AND VKPKDKOMM LIKE '" + AUFART.Trim() + "%'";
            dwData["VKPAUFKRS"] = " AND VKPAUFKRS LIKE'" + KRS + "%'";
            dwData["VKPAUFLFD"] = " AND VKPAUFLFD LIKE'" + LFD + "%'";
            dwData["VKPAUFPOS"] = " AND VKPAUFPOS LIKE'" + POS + "%'";
            SResult = TMV.QVKP32(dwData);
            MergeData(SResult, false,true); 
            base.QueryCommand(sender, e);
        }
        private void btnSendToExcel_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
        }
        
    }
}
